<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">
		</script>
		<script src="https://unpkg.com/vue@2.6.14/dist/vue.min.js"></script>
	</head>
	<body>
		正在支付请稍候......
	</body>
	<script>
		$(function(){
			var int =self.setInterval("zx()",5000)
			})
		function zx(){
				var reg = new RegExp("(^|&)out_trade_no=([^|&]*)(&|$)","i")
				var r = window.location.search.substr(1).match(reg)
				var id=""
				if(r!=null)
				{
					id= unescape(r[2])
				}
				console.log(id)
				var obj={
					"orderId":id
				}
				var str =JSON.stringify(obj)
				$.ajax({
					url:'mall/orderStatus.do',
					type:"post",
					contentType:"application/json",
					dataType:"json",
					data:str,
					success(resp) {
						alert(resp.msg)
						window.location.replace("index.html")
					},
					error(msg) {
						alert("支付错误")
						window.location.replace("index.html")
					}
			})
		}
	</script>
</html>